﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using ZhimeiSoft.CharmManager.Interface;
using ZhimeiSoft.CharmManager.Server.Proxy.Impl;
using ZhimeiSoft.CharmManager.DOL;

namespace ZhimeiSoft.CharmManager.Client.Proxy.Local
{
    public class LocalBusinessProxy : IBusinessService
    {
        
        #region 员工信息

        public bool InsertEmployee(EmployeeEntity employee, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.InsertEmployee(employee, out error);
        }

        public bool UpdateEmployee(EmployeeEntity employee, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.UpdateEmployee(employee, out error);
        }

        public bool DeleteEmployee(int employeeid, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.DeleteEmployee(employeeid, out error);
        }

        public bool QueryEmployeeState(string state, out DataSet dsEmployeeData, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryEmployeeState(state, out dsEmployeeData, out error);
        }

        #endregion

        #region 员工休假


        public bool InsertEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.InsertEmployeeVacation(employeeVacation, out error);
        }

        public bool DelEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.DelEmployeeVacation(employeeVacation, out error);
        }

        public bool UpdateEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation_old, DBEntityEmoloyeeVacation employeeVacation_new, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.UpdateEmployeeVacation(employeeVacation_old, employeeVacation_new, out error);
        }

        public bool QueryEmployeeVacationDateTime(string startDate, string endDate, out DataSet dsEmployeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.QueryEmployeeVacationDateTime(startDate, endDate, out dsEmployeeVacation, out error);
        }

        public bool QueryEmployeeVacationEmployeeID(int employeeID, string startDate, string endDate, out DataSet dsEmployeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.QueryEmployeeVacationEmployeeID(employeeID, startDate, endDate, out dsEmployeeVacation, out error);
        }

        #endregion

        #region 店信息


        public bool QuerySalonInfo(out System.Data.DataSet dsSalonInfo, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.QuerySalonInfo(out dsSalonInfo, out error);
        }

        #endregion

        #region 客户信息

        /// <summary>
        /// 添加客户信息
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>
        public bool InsertCustomer(DBEntityCustomInfo customer, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertCustomer(customer, out error);
        }

        /// <summary>
        /// 修改客户信息
        /// </summary>
        /// <param name="customer"></param>
        public bool UpdateCustomer(DBEntityCustomInfo customer, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateCustomer(customer, out error);
        }

        /// <summary>
        /// 删除客户信息
        /// </summary>
        /// <param name="customerID"></param>
        public bool DeleteCustomer(int customerID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteCustomer(customerID, out error);
        }
        /// <summary>
        /// 根据用户状态获取用户信息
        /// </summary>
        /// <param name="stateStr">用户状态</param>
        /// <param name="dsCustomInfo">返回用户信息</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool QueryCustomState(string stateStr, out DataSet dsCustomInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomState(stateStr, out dsCustomInfo, out error);
        }
        /// <summary>
        /// 根据用户ID获取数据
        /// </summary>
        /// <param name="customID">用户ID</param>
        /// <param name="dsCustomInfo">返回数据</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool QueryCustomID(int customID, out DataSet dsCustomInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomID(customID, out dsCustomInfo, out error);
        }
        #endregion


        #region 预约信息

        /// <summary>
        /// 插入预约记录
        /// </summary>
        /// <param name="scheduleInfo">信息类</param>
        public bool InsertSchedule(DBEntitySchedule scheduleInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertSchedule(scheduleInfo, out error);
        }
        /// <summary>
        /// 删除一条预约记录
        /// </summary>
        /// <param name="scheduleInfo">信息类</param>
        public bool DeleteSchedule(DBEntitySchedule scheduleInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteSchedule(scheduleInfo, out error);
        }
        /// <summary>
        /// 更新一条预约记录
        /// </summary>
        /// <param name="scheduleInfo">信息类</param>
        public bool UpdateSchedule(DBEntitySchedule scheduleInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateSchedule(scheduleInfo, out error);
        }
        /// <summary>
        /// 按照预约状态获取记录
        /// </summary>
        /// <param name="scheduleState">预约状态</param>
        /// <returns>返回数据</returns>
        public bool QueryScheduleState(string scheduleState, out DataSet dsSchedule, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryScheduleState(scheduleState, out dsSchedule, out error);
        }

        #endregion

    }
}
